package com.gwm.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.gwm.item.pojo.TbBrand;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 品牌表，一个品牌下有多个商品（spu），一对多关系 Mapper 接口
 * </p>
 *
 * @author heima
 * @since 2020-12-01
 */
public interface TbBrandMapper extends BaseMapper<TbBrand> {

    @Select("select b.* from tb_category_brand cb ,tb_brand b where  cb.brand_id=b.id and cb.category_id=#{categoryId}")
    List<TbBrand> findBrandListByCategoryId(Long categoryId);
}
